审核表缓写
请求地址
/v2/webservice/apply/check-deploy-tcapdb
请求方法
Post
请求参数说明
| 参数名称 | 类型 | 是否必填 | 说明 |
|---|
| apply_list | ApplyObject 数组 | 是 | 单据ID和审核配置 |
ApplyObject
| 参数名称 | 类型 | 是否必填 | 说明 |
|---|
| apply_id | number | 是 | 是 |
| sync_db_type | number 枚举[1 ,3 ,5 ,6] | 是 | 目的端,数据库类型MYSQL = 1,GCS = 3,SO_FILE = 5,KAFKA = 6, |
| write_interval | number | 否 | 否, 默认30秒 |
| sync_db_target | 缓写源端 | 否,默认slave | 缓写数据来源 |
| db_config | db配置 | 当sync_db_type=1或3时,必填 | |
| kafka_config | kafka配置 | 当sync_db_type=6时,必填 | |
| so_config | so配置 | 当sync_db_type=5时,必填 |
db配置
| 参数名称 | 类型 | 是否必填 | 说明 |
|---|
| db_ip | string | 是 | |
| db_port | number | 是 | |
| db_username | string | 是 | |
| db_password | string | 是 | |
| db_name | string | 是 | |
| db_table_prefix | string | 是 | |
| db_table_num | number | 否,默认1 | 最大2048 |
kafka配置
| 参数名称 | 类型 | 是否必填 | 说明 |
|---|
| kafka_id | | 是 | |
| kafka_address | | 是 | |
| kafka_user | | 是 | |
| kafka_password | | 是 | |
| topic_id | | 是 |
so配置
| 参数名称 | 类型 | 是否必填 | 说明 |
|---|
| so_file | | 是 | |
| so_window_size | | 是 | |
| so_alarm_receivers | | 是 |
示例
{
"apply_list": [
{
"apply_id": 16406,
"sync_db_type": 1,
"db_config": {
"db_ip": "9.134.70.239",
"db_name": "tcaplus_autoinstall",
"db_password": "tcaplus",
"db_port": 3306,
"db_table_num": 1,
"db_table_prefix": "TestData_",
"db_username": "tcaplus"
}
}
]
}
返回参数说明
成功返回
{
"code": 0,
"request_id": "89a6c2fb-b94b-4418-9a92-c146ceef01e1",
"data": {
"task_list": [
{
"apply_id": 16406,
"apply_type_text": "表缓写",
"zone_id": "1",
"app_id": 2,
"table_name": "lstFriendMail",
"table_type": 0,
"apply_type": 13,
"task_id": 13396,
"result": 0,
"msg": "审核成功, 请查看生成的任务"
}
]
}
}
失败返回
{
"request_id": "d1d5375d-9547-4f2a-9186-022fcf60b73f",
"code": 102,
"message": "单据不是待执行状态, 不能执行",
"debug_message": [
{
"apply_id": 16412,
"execute_status": 1,
"zone_id": "131",
"table_type": 0,
"table_name": "TestData",
"apply_type": 13
}
]
}